<template>
  <div @click="handleClick" :style="commpStyle">
    <el-input
        :readonly="readOnly"
        :disabled="disabled"
        :placeholder="placeholder"
        :suffix-icon="suffixIcon"
        :prefix-icon="prefixIcon"
        :size="size"
        v-model="dataStr">
    </el-input>
  </div>
</template>

<script>
import baseComp from "./baseComp";

export default {
  name: "selectDialog",
  extends: baseComp,
  props: {
    // 前置图标
    prefixIcon: {
      type: String,
      default: ""
    },
    // 后置图标
    suffixIcon: {
      type: String,
      default: ""
    },
    // 大小：medium / small / mini
    size:{
      type: String,
      default: ""
    },
    // placeholder
    placeholder: {
      type: String,
      default: ''
    },
    // 是否只读
    readOnly: {
      type: Boolean,
      default: false
    },
    // 是否禁用
    disabled: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      dataStr: ""
    }
  },
  methods: {
    //在 Input 获得焦点时触发
    // focusChange() {
    //   //向外传递事件
    //   this.executeEvent('focusChange', this.path);
    // },
    // //在 Input 失去焦点时触发
    // blurChange() {
    //   //向外传递事件
    //   this.executeEvent('focusChange', this.path);
    // },
    handleClick() {
      //向外传递事件
      this.executeEvent('handleClick', this.path, this.inData);
    }
  }
}
</script>

<style scoped>

</style>
